package com.jswlw.service.base;

import com.jswlw.entity.base.User;
import com.jswlw.entity.base.UserRole;
import com.jswlw.vo.AdminUserVo;

import java.util.List;
import java.util.Map;

/**
 * Created by wu on 2017-12-07.
 */
public interface UserService extends BaseService<User> {

    /**
     * 用户登录
     *
     * @param loginName
     * @param password
     * @return
     */
    Map login(String loginName, String password);

    User find4Id(Integer id);

    List<UserRole> findUserRole(Integer uid);

    void saveUserAuth(Integer[] roles, Integer userId);

    List<AdminUserVo> findUserAndRole();

    void delete4LoginName(String loginName);

    User find4OpenId(String openId);

    User find4LoginName(String loginName);
}
